package day10.snake;

public class Nodes {
    private int m;
    private int n;

    public Nodes() {
    }

    public Nodes(int m, int n) {
        this.m = m;
        this.n = n;
    }

    public int getM() {
        return m;
    }

    public void setM(int m) {
        this.m = m;
    }

    public int getN() {
        return n;
    }

    public void setN(int n) {
        this.n = n;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Nodes nodes = (Nodes) o;
        return m == nodes.m && n == nodes.n;
    }

    @Override
    public int hashCode() {
        int result = m;
        result = 31 * result + n;
        return result;
    }

    @Override
    public String toString() {
        return "Nodes{" +
                "m=" + m +
                ", n=" + n +
                '}';
    }
}
